/*
[
  {
    "id": 106,
    "attrName": "手机一级",
    "categoryId": 2,
    "categoryLevel": 1,
    "attrValueList": [
      {
        "id": 176,
        "valueName": "安卓手机",
        "attrId": 106
      },
      {
        "id": 175,
        "valueName": "苹果手机",
        "attrId": 106
      }
    ]
  },
]
*/
export interface AttrValueModel {
  id?: number;
  valueName: string;
  attrId?: number;
  isShowEdit?: boolean;
}

export type AttrValueListModel = AttrValueModel[];

export interface AttrModel {
  id?: number;
  attrName: string;
  categoryId?: number;
  categoryLevel: number;
  attrValueList: AttrValueListModel;
}

export type AttrListModel = AttrModel[];

export interface CategoryIdsModel {
  category1Id: number;
  category2Id: number;
  category3Id: number;
}

// Pick 从某个类型中挑出一些属性出来
export type SaveAttrModel = Pick<AttrModel, 'attrName' | 'attrValueList'>;
